import cgi
import pyips as pyipsmodule

def process(req):
    
    #return str(req), str(dir(req)), req.parsed_uri
    query_values = cgi.parse_qsl(req.parsed_uri[7])#environ['QUERY_STRING'])
	
    image_str, content_type = pyipsmodule.process_request(query_values)
    #start_response('200 OK', [('Content-Type', content_type)])
    req.content_type = content_type
    return image_str

if __name__ == '__main__':
    print "some"		    